
const tokens = {
  admin: {
    token: 'admin-token'
  },
  editor: {
    token: 'editor-token'
  }
}

const users = {
  'admin-token': {
    roles: ['admin'],
    introduction: 'I am a super administrator',
    avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
    name: 'Super Admin'
  },
  'editor-token': {
    roles: ['editor'],
    introduction: 'I am an editor',
    avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
    name: 'Normal Editor'
  }
}

module.exports = [
  //login
  {
    url: '/api/user/login',
    type: 'post',
    response: config => {
      return {
        code: '10000',
        data: {
          gender:1,
          headPortrait:'http://pic.hanfugou.com/web/2019/6/17/9/8071b8eabc924a5d8e6f78633b8737d9.jpeg_100x100.jpg',
          nickName:'管理员1',
          phone:'18800001111',
          token:'b81ab0d0a1b0484aace66aa987e074a6',
          userRole:1
        }
      }
    }
  },

  // getUserInfo
  {
    url: '/api/user/getUserInfo',
    type: 'get',
    response: config => {
      //const { username } = config.body
      //const token = tokens[username]

      
      return {
        code: '10000',
        data: {
          gender:1,
          headPortrait:'http://pic.hanfugou.com/web/2019/6/17/9/8071b8eabc924a5d8e6f78633b8737d9.jpeg_100x100.jpg',
          nickName:'管理员1',
          phone:'18800001111',
          token:'b81ab0d0a1b0484aace66aa987e074a6',
          userRole:1
        }
      }
    }
  },

  
]
